# $Id: PKGBUILD 70432 2012-05-06 08:07:26Z andrea $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: nesl247 <nesl247@gmail.com>
# Contributor: JJDaNiMoTh <jjdanimoth@gmail.com>

pkgname=fusion-icon
epoch=1
pkgver=0.1
pkgrel=1
pkgdesc="Simple tray icon for compiz"
arch=('any')
url="http://www.compiz.org/"
license=('GPL')
depends=('compiz-core>=0.8.4' 'pygtk' 'compizconfig-python'
         'hicolor-icon-theme' 'xorg-utils' 'mesa-demos')
makedepends=('git')
groups=('compiz-fusion' 'compiz-fusion-kde' 'compiz-fusion-gtk')
install=fusion-icon.install
#source=("http://gitweb.compiz.org/?p=users/crdlb/fusion-icon;a=snapshot;h=5e2dc91599f559040fd0c9d2040cd8906e302825;sf=tgz")
source=("ftp://ftp.archlinux.org/other/community/${pkgname}/${pkgname}-${pkgver}.tar.gz")
md5sums=('38e7dfb47b1e7a50c3cd191f9b393842')

package() {
  cd $srcdir/$pkgname

  # python2 fix
  sed -i 's_@python_@python2_' Makefile
  for file in $(find . -name '*.py' -print); do
    sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done
  
  make PREFIX=/usr DESTDIR=$pkgdir install
}
